Xbasic

Class Scope Keywords

Description

Several keywords are useful for working with scripts.

Three keywords are available:

Shared

All scripts in the current session.

Global

All scripts in the current Database

System

All scripts until Alpha Anywhere is closed down - so you can change from one database to another, and your class is still defined.

Without a keyword, the scope of the class is Local (just like a local function). It can only be used in the current script where it is defined. With a keyword, the scope of the class extends beyond the script in which it is defined.

In other words, the scope of a class is much like the scope of a variable.